home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / Constants.java < prev    next >
Text File  |  1998-06-30  |  11KB  |  292 lines

  1. /*
  2.  * @(#)Constants.java    1.3 98/04/12
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20. package com.sun.java.swing.text.html;
  21.  
  22. /**
  23.  * Constants used in the HTMLDocument.  These
  24.  * are basically tag names and attribute definitions.
  25.  * The definitions will be cleaned up and will become
  26.  * public in the next release.
  27.  *
  28.  * @author  Timothy Prinzing
  29.  * @version 1.3 04/12/98
  30.  */
  31. /*public*/ class Constants {
  32.  
  33.     // --- Tags  -----------------------------------
  34.  
  35.     /**
  36.      * PENDING(prinz) This is what the tag definitions
  37.      * are about to become.  These can be used in a hashtable
  38.      * efficiently.
  39.  
  40.     public static class Tag {
  41.     
  42.     Tag(String id) {
  43.         name = id;
  44.     }
  45.  
  46.         public String toString() {
  47.         return name;
  48.     }
  49.             
  50.     String name;
  51.     }
  52.  
  53.     public static final Tag A = new Tag("a");
  54.     public static final Tag ADDRESS = new Tag("address");
  55.     public static final Tag APPLET = new Tag("applet");
  56.     public static final Tag AREA = new Tag("area");
  57.     public static final Tag B = new Tag("b");
  58.     public static final Tag BASE = new Tag("base");
  59.     public static final Tag BASEFONT = new Tag("basefont");
  60.     public static final Tag BIG = new Tag("big");
  61.     public static final Tag BLOCKQUOTE = new Tag("blockquote");
  62.     public static final Tag BODY = new Tag("body");
  63.     public static final Tag BR = new Tag("br");
  64.     public static final Tag CAPTION = new Tag("caption");
  65.     public static final Tag CENTER = new Tag("center");
  66.     public static final Tag CITE = new Tag("cite");
  67.     public static final Tag CODE = new Tag("code");
  68.     public static final Tag COLOR = new Tag("color");
  69.     public static final Tag DD = new Tag("dd");
  70.     public static final Tag DFN = new Tag("dfn");
  71.     public static final Tag DIR = new Tag("dir");
  72.     public static final Tag DIV = new Tag("div");
  73.     public static final Tag DL = new Tag("dl");
  74.     public static final Tag DT = new Tag("dt");
  75.     public static final Tag EM = new Tag("em");
  76.     public static final Tag FACE = new Tag("face");
  77.     public static final Tag FONT = new Tag("font");
  78.     public static final Tag FORM = new Tag("form");
  79.     public static final Tag H1 = new Tag("h1");
  80.     public static final Tag H2 = new Tag("h2");
  81.     public static final Tag H3 = new Tag("h3");
  82.     public static final Tag H4 = new Tag("h4");
  83.     public static final Tag H5 = new Tag("h5");
  84.     public static final Tag H6 = new Tag("h6");
  85.     public static final Tag HEAD = new Tag("head");
  86.     public static final Tag HR = new Tag("hr");
  87.     public static final Tag HTML = new Tag("html");
  88.     public static final Tag I = new Tag("i");
  89.     public static final Tag IMG = new Tag("img");
  90.     public static final Tag INPUT = new Tag("input");
  91.     public static final Tag ISINDEX = new Tag("isindex");
  92.     public static final Tag KBD = new Tag("kbd");
  93.     public static final Tag LI = new Tag("li");
  94.     public static final Tag LINK = new Tag("link");
  95.     public static final Tag MAP = new Tag("map");
  96.     public static final Tag MENU = new Tag("menu");
  97.     public static final Tag META = new Tag("meta");
  98.     public static final Tag OL = new Tag("ol");
  99.     public static final Tag OPTION = new Tag("option");
  100.     public static final Tag P = new Tag("p");
  101.     public static final Tag PARAM = new Tag("param");
  102.     public static final Tag PRE = new Tag("pre");
  103.     public static final Tag PROMPT = new Tag("prompt");
  104.     public static final Tag SAMP = new Tag("samp");
  105.     public static final Tag SCRIPT = new Tag("script");
  106.     public static final Tag SELECT = new Tag("select");
  107.     public static final Tag SMALL = new Tag("small");
  108.     public static final Tag SRC = new Tag("src");
  109.     public static final Tag STRIKE = new Tag("strike");
  110.     public static final Tag STRONG = new Tag("strong");
  111.     public static final Tag STYLE = new Tag("style");
  112.     public static final Tag SUB = new Tag("sub");
  113.     public static final Tag SUP = new Tag("sup");
  114.     public static final Tag TABLE = new Tag("table");
  115.     public static final Tag TD = new Tag("td");
  116.     public static final Tag TEXT = new Tag("text");
  117.     public static final Tag TEXTAREA = new Tag("textarea");
  118.     public static final Tag TH = new Tag("th");
  119.     public static final Tag TITLE = new Tag("title");
  120.     public static final Tag TR = new Tag("tr");
  121.     public static final Tag TT = new Tag("tt");
  122.     public static final Tag U = new Tag("u");
  123.     public static final Tag UL = new Tag("ul");
  124.     public static final Tag VAR = new Tag("var");
  125.     */
  126.   
  127.   static final String A = "a";
  128.   static final String ADDRESS = "address";
  129.   static final String APPLET = "applet";
  130.   static final String AREA = "area";
  131.   static final String B = "b";
  132.   static final String BASE = "base";
  133.   static final String BASEFONT = "basefont";
  134.   static final String BIG = "big";
  135.   static final String BLOCKQUOTE = "blockquote";
  136.   static final String BODY = "body";
  137.   static final String BR = "br";
  138.   static final String CAPTION = "caption";
  139.   static final String CENTER = "center";
  140.   static final String CITE = "cite";
  141.   static final String CODE = "code";
  142.   static final String COLOR = "color";
  143.   static final String DD = "dd";
  144.   static final String DFN = "dfn";
  145.   static final String DIR = "dir";
  146.   static final String DIV = "div";
  147.   static final String DL = "dl";
  148.   static final String DT = "dt";
  149.   static final String EM = "em";
  150.   static final String FACE = "face";
  151.   static final String FONT = "font";
  152.   static final String FORM = "form";
  153.   static final String H1 = "h1";
  154.   static final String H2 = "h2";
  155.   static final String H3 = "h3";
  156.   static final String H4 = "h4";
  157.   static final String H5 = "h5";
  158.   static final String H6 = "h6";
  159.   static final String HEAD = "head";
  160.   static final String HR = "hr";
  161.   static final String HTML = "html";
  162.   static final String I = "i";
  163.   static final String IMG = "img";
  164.   static final String INPUT = "input";
  165.   static final String ISINDEX = "isindex";
  166.   static final String KBD = "kbd";
  167.   static final String LI = "li";
  168.   static final String LINK = "link";
  169.   static final String MAP = "map";
  170.   static final String MENU = "menu";
  171.   static final String META = "meta";
  172.   static final String OL = "ol";
  173.   static final String OPTION = "option";
  174.   static final String P = "p";
  175.   static final String PARAM = "param";
  176.   static final String PRE = "pre";
  177.   static final String PRELINE = "pre-line";
  178.   static final String PROMPT = "prompt";
  179.   static final String SAMP = "samp";
  180.   static final String SCRIPT = "script";
  181.   static final String SELECT = "select";
  182.   static final String SMALL = "small";
  183.   static final String SRC = "src";
  184.   static final String STRIKE = "strike";
  185.   static final String STRONG = "strong";
  186.   static final String STYLE = "style";
  187.   static final String SUB = "sub";
  188.   static final String SUP = "sup";
  189.   static final String TABLE = "table";
  190.   static final String TD = "td";
  191.   static final String TEXT = "text";
  192.   static final String TEXTAREA = "textarea";
  193.   static final String TH = "th";
  194.   static final String TITLE = "title";
  195.   static final String TR = "tr";
  196.   static final String TT = "tt";
  197.   static final String U = "u";
  198.   static final String UL = "ul";
  199.   static final String VAR = "_var";
  200.  
  201.     // PENDING(prinz) The attribute keys should be immutable
  202.     // objects for fast lookup/compare.  The following needs
  203.     // to change before it can be public.  Also, some of these
  204.     // should be deleted and the well known constant used.  
  205.     // Others are not actually attributes.
  206.     // THESE NEED TO BE CLEANED UP!
  207.  
  208.     // AttributeNames
  209.     static final String ALIGN = "align";
  210.     static final String LEFT = "left";
  211.     static final String RIGHT = "right";
  212.     static final String BOLD = "bold";
  213.     static final String ITALIC = "italic";
  214.     static final String UNDERLINE = "underline";
  215.     static final String SIZE = "size";
  216.     static final String PARAGRAPH = "paragraph";
  217.     static final String HEIGHT = "height";
  218.     static final String WIDTH = "width";
  219.     static final String HREF = "href";
  220.     static final String TYPE = "type";
  221.     static final String COMPACT = "compact";
  222.     static final String VALUE = "value";
  223.     static final String NOSHADE= "noshade";
  224.     static final String HSPACE = "hspace";
  225.     static final String VSPACE = "vspace";
  226.     static final String ALT = "alt";
  227.     static final String BORDER = "border";
  228.     static final String ISMAP = "ismap";
  229.     static final String USEMAP = "usemap";
  230.     static final String NAME = "name";
  231.     static final String REL = "rel";
  232.     static final String REV = "rev";
  233.     static final String START = "start";
  234.     static final String ROWS = "rows";
  235.     static final String COLS = "cols";
  236.     static final String NULL_ATTRIBUTE = "#DEFAULT";
  237.  
  238.     /**
  239.      * The property name for the actual html tag name used
  240.      * as an attribute for the writer.
  241.      */
  242.     static final String HTMLTagAttribute = "htmltag";
  243.  
  244.     /**
  245.      * The property name for the base href which is used to
  246.      * define the absolute URL against relatives URLs in the document.
  247.      */
  248.     static final String BaseHrefProperty = "basehref";
  249.  
  250.     /**
  251.      * The property name for the BGCOLOR which is used to
  252.      * define the Background Color for a HTML Document
  253.      */
  254.     static final String BGCOLOR = "bgcolor";
  255.  
  256.     /**
  257.      * The property name for the BACKGROUND (Image) which is used to
  258.      * define the Background Image for a HTML Document
  259.      */
  260.     static final String BACKGROUND = "background";
  261.  
  262.     /**
  263.      * The property name for the Keywords  which is used to
  264.      * define the keywords for a HTML Document
  265.      */
  266.     static final String KEYWORDS = "Keywords";
  267.  
  268.     /**
  269.      * The property name for the VLINK  which is used to
  270.      * define the visited hyperlink color for a HTML Document
  271.      */
  272.     static final String VLINK = "vlink";
  273.  
  274.     /**
  275.      * The property name for the ALINK  which is used to
  276.      * define the  active hyperlink color for a HTML Document
  277.      */
  278.     static final String ALINK = "alink";
  279.  
  280.     /**
  281.      * The attribute name used to identify INPUT tag elements.
  282.      */
  283.     static final String HTMLInputComponent = "input-component";
  284.  
  285.  
  286.  
  287.   // Misc.
  288.   static final String IMPLIEDP = "impliedp";
  289.  
  290.  
  291. }
  292.